<head>
    <title>作业二</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
    <!-- and it's easy to individually load additional languages -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/languages/go.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
</head>
<pre>
    <code class="language-python">
    def is_anagram(str1, str2):
        list_str1 = list(str1)
        list_str1.sort()
        list_str2 = list(str2)
        list_str2.sort()

        return list_str1 == list_str2

    print(is_anagram('anagram', 'nagaram'))
    print(is_anagram('cat', 'rat'))
    </code>
</pre>